From: Ian Jackson Date: Thu, 2 Jun 2011 17:46:34 +0000 (+0100) Subject: libxl: disks: expose new "script" parameter for external block scripts X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~10224^2~8 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3c54832f67875287d159cf72c08f3bd90c144fa3;p=xen.git libxl: disks: expose new "script" parameter for external block scripts This is not currently implemented. Applications setting it to anything but NULL will cause an error. Code to set it from xl configuration files will appear later in this series. Signed-off-by: Ian Jackson Committed-by: Ian Jackson --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index f45dd39f06..d7672e35dd 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -970,6 +970,13 @@ int libxl_device_disk_add(libxl_ctx *ctx, uint32_t domid, libxl_device_disk *dis goto out_free; } + if (disk->script) { + LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "External block scripts" + " not yet supported, sorry"); + rc = ERROR_INVAL; + goto out_free; + } + devid = libxl__device_disk_dev_number(disk->vdev, NULL, NULL); if (devid==-1) { LIBXL__LOG(ctx, LIBXL__LOG_ERROR, "Invalid or unsupported" diff --git a/tools/libxl/libxl.idl b/tools/libxl/libxl.idl index 71ad051699..b2ab52cfb1 100644 --- a/tools/libxl/libxl.idl +++ b/tools/libxl/libxl.idl @@ -279,6 +279,7 @@ libxl_device_disk = Struct("device_disk", [ ("vdev", string), ("backend", libxl_disk_backend), ("format", libxl_disk_format), + ("script", string), ("unpluggable", integer), ("readwrite", integer), ("is_cdrom", integer),